package com.killer.utils;

public class StringUtil {
    public static String upperFirstChar(String input) {
        if (input == null || "".equals(input)) {
            return input;
        }
        StringBuffer buff = new StringBuffer();
        char[] bs = input.toCharArray();
        for (int i = 0; i < bs.length; i++) {
            if (i == 0) {
                buff.append(String.valueOf(bs[0]).toUpperCase());
                continue;
            }
            buff.append(bs[i]);
        }
        return buff.toString();
    }

    public static String lowerFirstChar(String input) {
        if (input == null || "".equals(input)) {
            return input;
        }
        StringBuffer buff = new StringBuffer();
        char[] bs = input.toCharArray();
        for (int i = 0; i < bs.length; i++) {
            if (i == 0) {
                buff.append(String.valueOf(bs[0]).toLowerCase());
                continue;
            }
            buff.append(bs[i]);
        }
        return buff.toString();
    }

    public static boolean isBlank(String string) {
        return string == null || "".equals(string);
    }

    public static void main(String[] args) {
        System.out.println(lowerFirstChar("TranstacionManager"));
    }
}
